<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>消息窗位置 - jQuery EasyUI 演示</title>
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../../locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
	<h2 title="Message Box Position">消息窗位置</h2>
	<p title="Click the buttons below to display message box on different position.">　　点击以下每个按钮即可在不同的位置呈现消息窗。</p>
	<div style="margin:20px 0;"><c>
		<p>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="topLeft();" title="TopLeft">左上</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="topCenter()" title="TopCenter">中上</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="topRight()" title="TopRight">右上</a>
		</p>
		<p>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="centerLeft()" title="CenterLeft">左中</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="center()" title="Center">正中</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="centerRight()" title="CenterRight">右中</a>
		</p>
		<p>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="bottomLeft()" title="BottomLeft">左下</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="bottomCenter()" title="BottomCenter">中下</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="bottomRight()" title="BottomRight">右下</a>
		</p></c>
	</div>
	<script>
		function topLeft(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（左上）……',
				showType:'show',
				style:{
					right:'',
					left:0,
					top:document.body.scrollTop+document.documentElement.scrollTop,
					bottom:''
				}
			});
		}
		function topCenter(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（中上）……',
				showType:'slide',
				style:{
					right:'',
					top:document.body.scrollTop+document.documentElement.scrollTop,
					bottom:''
				}
			});
		}
		function topRight(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（右上）……',
				showType:'show',
				style:{
					left:'',
					right:0,
					top:document.body.scrollTop+document.documentElement.scrollTop,
					bottom:''
				}
			});
		}
		function centerLeft(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（左中）……',
				showType:'fade',
				style:{
					left:0,
					right:'',
					bottom:''
				}
			});
		}
		function center(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（中）……',
				showType:'fade',
				style:{
					right:'',
					bottom:''
				}
			});
		}
		function centerRight(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（右中）……',
				showType:'fade',
				style:{
					left:'',
					right:0,
					bottom:''
				}
			});
		}
		function bottomLeft(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（左下）……',
				showType:'show',
				style:{
					left:0,
					right:'',
					top:'',
					bottom:-document.body.scrollTop-document.documentElement.scrollTop
				}
			});
		}
		function bottomCenter(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（中下）……',
				showType:'slide',
				style:{
					right:'',
					top:'',
					bottom:-document.body.scrollTop-document.documentElement.scrollTop
				}
			});
		}
		function bottomRight(){
			$.messager.show({
				title:'我的标题',
				msg:'此乃消息内容（右下）……',
				showType:'show'
			});
		}
	</script>
</body>
</html>